package com.longrise.android.byjk.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by xkj on 16/4/6.
 * 全部课程的子item  我的课程item也用这个
 */
public class AllCourseChildBean implements Parcelable {

    public AllCourseChildBean(){

    }

    private String coursestate; // 0.正常  1.已过期 2.已下架
    private String realpic;
    private String signupendtime;
    private String grouptype;
    private String grouptypename;
    private String coursetype;
    private String coursetypename;
    private String courseid;
    private String name;
    private String originprice;
    private String realprice;
    private String grouptime;
    private String cwtype; //轻疾重疾
    private String expiretime; //到期时间
    private boolean ispass; //是否通过
    private boolean isfree; //是否是免费课程
    private int traintype ;//课程的分类 ,例如 风险管理师 ,消化系统,免疫系统

    public int getTraintype() {
        return traintype;
    }

    public void setTraintype(int traintype) {
        this.traintype = traintype;
    }

    public String getExpiretime() {
        return expiretime;
    }

    public void setExpiretime(String expiretime) {
        this.expiretime = expiretime;
    }

    public boolean ispass() {
        return ispass;
    }

    public void setIspass(boolean ispass) {
        this.ispass = ispass;
    }

    public String getCwtype() {
        return cwtype;
    }

    public void setCwtype(String cwtype) {
        this.cwtype = cwtype;
    }

    public String getRealpic() {
        return realpic;
    }

    public void setRealpic(String realpic) {
        this.realpic = realpic;
    }

    public String getSignupendtime() {
        return signupendtime;
    }

    public void setSignupendtime(String signupendtime) {
        this.signupendtime = signupendtime;
    }

    public String getGrouptype() {
        return grouptype;
    }

    public void setGrouptype(String grouptype) {
        this.grouptype = grouptype;
    }

    public String getGrouptypename() {
        return grouptypename;
    }

    public void setGrouptypename(String grouptypename) {
        this.grouptypename = grouptypename;
    }

    public String getCoursetype() {
        return coursetype;
    }

    public void setCoursetype(String coursetype) {
        this.coursetype = coursetype;
    }

    public String getCoursetypename() {
        return coursetypename;
    }

    public void setCoursetypename(String coursetypename) {
        this.coursetypename = coursetypename;
    }

    public String getCourseid() {
        return courseid;
    }

    public void setCourseid(String courseid) {
        this.courseid = courseid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOriginprice() {
        return originprice;
    }

    public void setOriginprice(String originprice) {
        this.originprice = originprice;
    }

    public String getRealprice() {
        return realprice;
    }

    public void setRealprice(String realprice) {
        this.realprice = realprice;
    }

    public String getGrouptime() {
        return grouptime;
    }

    public void setGrouptime(String grouptime) {
        this.grouptime = grouptime;
    }

    public String getCoursestate() {
        return coursestate;
    }

    public void setCoursestate(String coursestate) {
        this.coursestate = coursestate;
    }

    public boolean isfree() {
        return isfree;
    }

    public void setIsfree(boolean isfree) {
        this.isfree = isfree;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.coursestate);
        dest.writeString(this.realpic);
        dest.writeString(this.signupendtime);
        dest.writeString(this.grouptype);
        dest.writeString(this.grouptypename);
        dest.writeString(this.coursetype);
        dest.writeString(this.coursetypename);
        dest.writeString(this.courseid);
        dest.writeString(this.name);
        dest.writeString(this.originprice);
        dest.writeString(this.realprice);
        dest.writeString(this.grouptime);
        dest.writeString(this.cwtype);
        dest.writeString(this.expiretime);
        dest.writeByte(this.ispass ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isfree ? (byte) 1 : (byte) 0);
        dest.writeInt(this.traintype);
    }

    protected AllCourseChildBean(Parcel in) {
        this.coursestate = in.readString();
        this.realpic = in.readString();
        this.signupendtime = in.readString();
        this.grouptype = in.readString();
        this.grouptypename = in.readString();
        this.coursetype = in.readString();
        this.coursetypename = in.readString();
        this.courseid = in.readString();
        this.name = in.readString();
        this.originprice = in.readString();
        this.realprice = in.readString();
        this.grouptime = in.readString();
        this.cwtype = in.readString();
        this.expiretime = in.readString();
        this.ispass = in.readByte() != 0;
        this.isfree = in.readByte() != 0;
        this.traintype = in.readInt();
    }

    public static final Creator<AllCourseChildBean> CREATOR = new Creator<AllCourseChildBean>() {
        @Override
        public AllCourseChildBean createFromParcel(Parcel source) {
            return new AllCourseChildBean(source);
        }

        @Override
        public AllCourseChildBean[] newArray(int size) {
            return new AllCourseChildBean[size];
        }
    };
}
